package net.flyinggroup.mapstruct.extension;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import org.springframework.core.convert.converter.Converter;

@Mapper(componentModel = "spring")
public interface SeatConfigurationMapper extends Converter<SeatConfiguration, SeatConfigurationDto> {
    SeatConfigurationMapper INSTANCE = Mappers.getMapper(SeatConfigurationMapper.class);

    @Mapping(target = "seatCount", source = "numberOfSeats")
    @Mapping(target = "material", source = "seatMaterial")
    SeatConfigurationDto convert(SeatConfiguration seatConfiguration);
}